home *** CD-ROM | disk | FTP | other *** search
- /* 1995 H.Ogasawara (COR.) */
-
- #include <corlib.h>
- #include <HS_wlib.h>
-
-
- #define DIALOGSIZEH (34*8)
- #define DIALOGSIZEV (16*2)
- #define FONT 16
- #define OFX 8
- #define OFY 8
-
- static
- DialogExec( wp, info )
- WindowID wp;
- EventInfo *info;
- {
- switch( info->option ){
- DrawBuf dbuf[4];
- case EventRedraw:
- DrawSetClear( dbuf, ColorGray );
- DrawSetSymbol( dbuf+1, OFX, OFY, HS_WindowGetClientPointer(wp),
- HS_WindowGetClientData(wp), FONT );
- DrawSetLine( dbuf+2, 4, 4, DIALOGSIZEH-4, DIALOGSIZEV-4,
- ShadowDown, OptionShadow );
- WindowDraw( wp, dbuf, 3 );
- break;
- case EventClose:
- WindowClose( wp );
- break;
- }
- return TRUE;
- }
-
- WindowID
- DialogMessageOpen( msg, attr )
- char *msg;
- {
- int x, y;
- unsigned short *sp;
- WindowID wp;
- WindowGetRootScroll( &x, &y );
- sp= WindowGetScreenTable( WindowGetScreenMode() );
- x+= (sp[0]-DIALOGSIZEH)/2;
- y+= (sp[1]-DIALOGSIZEV)/2;
- wp= WindowSimpleOpen( x, y, DIALOGSIZEH, DIALOGSIZEV,
- NULL, DialogExec );
- HS_WindowGetClientPointer( wp )= msg;
- HS_WindowGetClientData( wp )= attr;
- WindowRedraw( wp );
- return wp;
- }
-
-